<template>
  <div>
    <div class="box">
      {{ 1 + 1 }}
    </div>
    <button @click="add">添加</button>
    <button @click="add2">去除0，换成4，校验0</button>
    <button @click="add3">去除0，换成4，校验0</button>
  </div>
</template>
<script>
import { ref } from 'vue'
import ExchangeMap from './class/ExchangeMap.js'
export default {
  data() {
    return {
      //生成地图的时候保证不会出现消除
    }
  },
  methods: {
    add() {
      console.log(`helloworld`)
    },
    add2() {
      this.em.stack[0] = 4
      this.em.checkRowAll(0, 4)
      console.log(_.chunk(this.em.stack, 5))
    },
    add3() {
      this.em.stack[0] = 4
      this.em.stack[1] = 4
      this.em.stack[2] = 4
      this.em.checkRowAll(0, 4)
      console.log(_.chunk(this.em.stack, 5))
    }
  },
  mounted() {
    this.em = new ExchangeMap()
  }
}
</script>
<style type="text/css">
.box {
  width: 100px;
  height: 100px;
  border: 1px solid #000;
}
</style>
